home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / man / cat.3 / GetSelect.3 < prev    next >
Text File  |  1995-07-25  |  6KB  |  133 lines

  1.  
  2.  
  3.  
  4.      TTTTkkkk____GGGGeeeettttSSSSeeeelllleeeeccccttttiiiioooonnnn((((3333))))           TTTTkkkk (((( ))))            TTTTkkkk____GGGGeeeettttSSSSeeeelllleeeeccccttttiiiioooonnnn((((3333))))
  5.  
  6.  
  7.  
  8.      _________________________________________________________________
  9.  
  10.      NNNNAAAAMMMMEEEE
  11.           Tk_GetSelection - retrieve the contents of the selection
  12.  
  13.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  14.           ####iiiinnnncccclllluuuuddddeeee <<<<ttttkkkk....hhhh>>>>
  15.  
  16.           int
  17.           TTTTkkkk____GGGGeeeettttSSSSeeeelllleeeeccccttttiiiioooonnnn(_i_n_t_e_r_p, _t_k_w_i_n, _t_a_r_g_e_t, _p_r_o_c, _c_l_i_e_n_t_D_a_t_a)
  18.  
  19.      AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  20.           Tcl_Interp      *_i_n_t_e_r_p      (in)      Interpreter  to   use
  21.                                                  for reporting errors.
  22.  
  23.           Tk_Window       _t_k_w_i_n        (in)      Window    on    whose
  24.                                                  behalf   to  retrieve
  25.                                                  the         selection
  26.                                                  (determines   display
  27.                                                  from     which     to
  28.                                                  retrieve).
  29.  
  30.           Atom            _t_a_r_g_e_t       (in)      Form  in   which   to
  31.                                                  retrieve selection.
  32.  
  33.           Tk_GetSelProc   *_p_r_o_c        (in)      Procedure  to  invoke
  34.                                                  to  process pieces of
  35.                                                  the selection as they
  36.                                                  are retrieved.
  37.  
  38.           ClientData      _c_l_i_e_n_t_D_a_t_a   (in)      Arbitrary    one-word
  39.                                                  value   to   pass  to
  40.                                                  _p_r_o_c.
  41.      _________________________________________________________________
  42.  
  43.  
  44.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  45.           TTTTkkkk____GGGGeeeettttSSSSeeeelllleeeeccccttttiiiioooonnnn  retrieves  the  selection  in  the   format
  46.           specified   by   _t_a_r_g_e_t.   The  selection  may  actually  be
  47.           retrieved in several pieces;  as each  piece  is  retrieved,
  48.           _p_r_o_c  is  called  to  process  the  piece.  _P_r_o_c should have
  49.           arguments and result that match the type TTTTkkkk____GGGGeeeettttSSSSeeeellllPPPPrrrroooocccc:
  50.                typedef int Tk_GetSelProc(
  51.                     ClientData _c_l_i_e_n_t_D_a_t_a,
  52.                     Tcl_Interp *_i_n_t_e_r_p,
  53.                     char *_p_o_r_t_i_o_n);
  54.           The _c_l_i_e_n_t_D_a_t_a and _i_n_t_e_r_p parameters to _p_r_o_c will be  copies
  55.           of  the corresponding arguments to TTTTkkkk____GGGGeeeettttSSSSeeeelllleeeeccccttttiiiioooonnnn.  _P_o_r_t_i_o_n
  56.           will be a pointer to a string containing part or all of  the
  57.           selection.   For  large  selections,  _p_r_o_c  will  be  called
  58.           several times with sucessive portions of the selection.  The
  59.           X  Inter-Client  Communication Conventions Manual allows the
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 7/23/95)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      TTTTkkkk____GGGGeeeettttSSSSeeeelllleeeeccccttttiiiioooonnnn((((3333))))           TTTTkkkk (((( ))))            TTTTkkkk____GGGGeeeettttSSSSeeeelllleeeeccccttttiiiioooonnnn((((3333))))
  71.  
  72.  
  73.  
  74.           selection to be returned in formats other than strings, e.g.
  75.           as  an  array  of  atoms  or  integers.  If this happens, Tk
  76.           converts the selection back into  a  string  before  calling
  77.           _p_r_o_c.  If the selection is returned as an array of atoms, Tk
  78.           converts it to a string containing the atom names  separated
  79.           by  white  space.   For  any other format besides string, Tk
  80.           converts the selection to a  string  containing  hexadecimal
  81.           values separated by white space.
  82.  
  83.           TTTTkkkk____GGGGeeeettttSSSSeeeelllleeeeccccttttiiiioooonnnn returns to its caller when the selection has
  84.           been  completely  retrieved and processed by _p_r_o_c, or when a
  85.           fatal error has occurred (e.g. the  selection  owner  didn't
  86.           respond promptly).  TTTTkkkk____GGGGeeeettttSSSSeeeelllleeeeccccttttiiiioooonnnn normally returns TCL_OK;
  87.           if an error occurs, it returns TCL_ERROR and leaves an error
  88.           message  in  _i_n_t_e_r_p->_r_e_s_u_l_t.  _P_r_o_c should also return either
  89.           TCL_OK or TCL_ERROR. If _p_r_o_c encounters an error in  dealing
  90.           with  the  selection,  it  should  leave an error message in
  91.           _i_n_t_e_r_p->_r_e_s_u_l_t and return TCL_ERROR;  this  will  abort  the
  92.           selection retrieval.
  93.  
  94.  
  95.      KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
  96.           format, get, selection retrieval
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 7/23/95)
  130.  
  131.  
  132.  
  133.